A slug is the part of a URL which identifies a page using human-readable keywords [1][2], for example "Slug_(web_publishing)", rather than an opaque identifier such as the ID number of the content within the database (e.g. "4859604"). Slugs are used to construct clean URLs (often for permalinks) that are easy to type, descriptive, and easy to remember.
For example, in this URL:
http://example.org/2011/introduction-to-blogging
the slug is "introduction-to-blogging".
Typically, slugs are generated from a human-readable phrase such as the title of a news article, blog post, or encyclopedia entry. It is also common practice to make the slug all lowercase and to remove non-essential words, such as conjunctions and articles, to shorten the final URL. Long page titles may also be truncated to keep the URL a reasonable length.
To make the URL easier for users to type, special characters are often removed or replaced as well. For instance, accented characters are usually replaced by letters from the English alphabet; punctuation marks are generally removed; and spaces (which have to be encoded as %20 or +) are replaced by dashes (-) or underscores (_), which are more aesthetically pleasing.